package org.jfbmonitor.beans;


import java.util.Date;

/**
 * 
 * @author Randerson Gustavo Corassa Suart
 */
public class DataBase {
	private String dataBaseName;
	private Integer pageSize;
	private Integer odsMajor;
	private Integer odsMinor;
	private Integer oldestTransaction;
	private Integer oldestActive;
	private Integer oldestSnapshot;
	private Integer nextTransaction;
	private Integer pageBuffers;
	private Integer sqlDialect;
	private String shutdownMode;
	private Integer sweepInterval;
	private Integer readOnly;
	private Integer forcedWrites;
	private Integer ReserveSpace;
	private Date creationDate;
	private Long pages;
	private String backupState;
	private Integer statId;
	
	public DataBase(String dataBaseName, Integer pageSize, Integer odsMajor,
			Integer odsMinor, Integer oldestTransaction, Integer oldestActive,
			Integer oldestSnapshot, Integer nextTransaction,
			Integer pageBuffers, Integer sqlDialect, String shutdownMode,
			Integer sweepInterval, Integer readOnly, Integer forcedWrites,
			Integer reserveSpace, Date creationDate, Long pages,
			String backupState, Integer statId) {
		super();
		this.dataBaseName = dataBaseName;
		this.pageSize = pageSize;
		this.odsMajor = odsMajor;
		this.odsMinor = odsMinor;
		this.oldestTransaction = oldestTransaction;
		this.oldestActive = oldestActive;
		this.oldestSnapshot = oldestSnapshot;
		this.nextTransaction = nextTransaction;
		this.pageBuffers = pageBuffers;
		this.sqlDialect = sqlDialect;
		this.shutdownMode = shutdownMode;
		this.sweepInterval = sweepInterval;
		this.readOnly = readOnly;
		this.forcedWrites = forcedWrites;
		this.ReserveSpace = reserveSpace;
		this.creationDate = creationDate;
		this.pages = pages;
		this.backupState = backupState;
		this.statId = statId;
	}
	
	public String getDataBaseName() {
		return dataBaseName;
	}

	public void setDataBaseName(String dataBaseName) {
		this.dataBaseName = dataBaseName;
	}

	public Integer getPageSize() {
		return pageSize;
	}

	public void setPageSize(Integer pageSize) {
		this.pageSize = pageSize;
	}

	public Integer getOdsMajor() {
		return odsMajor;
	}

	public void setOdsMajor(Integer odsMajor) {
		this.odsMajor = odsMajor;
	}

	public Integer getOdsMinor() {
		return odsMinor;
	}

	public void setOdsMinor(Integer odsMinor) {
		this.odsMinor = odsMinor;
	}

	public Integer getOldestTransaction() {
		return oldestTransaction;
	}

	public void setOldestTransaction(Integer oldestTransaction) {
		this.oldestTransaction = oldestTransaction;
	}

	public Integer getOldestActive() {
		return oldestActive;
	}

	public void setOldestActive(Integer oldestActive) {
		this.oldestActive = oldestActive;
	}

	public Integer getOldestSnapshot() {
		return oldestSnapshot;
	}

	public void setOldestSnapshot(Integer oldestSnapshot) {
		this.oldestSnapshot = oldestSnapshot;
	}

	public Integer getNextTransaction() {
		return nextTransaction;
	}

	public void setNextTransaction(Integer nextTransaction) {
		this.nextTransaction = nextTransaction;
	}

	public Integer getPageBuffers() {
		return pageBuffers;
	}

	public void setPageBuffers(Integer pageBuffers) {
		this.pageBuffers = pageBuffers;
	}

	public Integer getSqlDialect() {
		return sqlDialect;
	}

	public void setSqlDialect(Integer sqlDialect) {
		this.sqlDialect = sqlDialect;
	}

	public String getShutdownMode() {
		return shutdownMode;
	}

	public void setShutdownMode(String shutdownMode) {
		this.shutdownMode = shutdownMode;
	}

	public Integer getSweepInterval() {
		return sweepInterval;
	}

	public void setSweepInterval(Integer sweepInterval) {
		this.sweepInterval = sweepInterval;
	}

	public Integer getReadOnly() {
		return readOnly;
	}

	public void setReadOnly(Integer readOnly) {
		this.readOnly = readOnly;
	}

	public Integer getForcedWrites() {
		return forcedWrites;
	}

	public void setForcedWrites(Integer forcedWrites) {
		this.forcedWrites = forcedWrites;
	}

	public Integer getReserveSpace() {
		return ReserveSpace;
	}

	public void setReserveSpace(Integer ReserveSpace) {
		this.ReserveSpace = ReserveSpace;
	}

	public Date getCreationDate() {
		return creationDate;
	}

	public void setCreationDate(Date creationDate) {
		this.creationDate = creationDate;
	}

	public Long getPages() {
		return pages;
	}

	public void setPages(Long pages) {
		this.pages = pages;
	}

	public String getBackupState() {
		return backupState;
	}

	public void setBackupState(String backupState) {
		this.backupState = backupState;
	}

	public Integer getStatId() {
		return statId;
	}

	public void setStatId(Integer statId) {
		this.statId = statId;
	}
}

/*
 * SELECT PARA SER UTILIZA PELO DAO PARA POPULAR O JAVABEAN select
 * MON$DATABASE_NAME MON$PAGE_SIZE, MON$ODS_MAJOR, MON$ODS_MINOR,
 * MON$OLDEST_TRANSACTION, MON$OLDEST_ACTIVE, MON$OLDEST_SNAPSHOT,
 * MON$NEXT_TRANSACTION, MON$PAGE_BUFFERS, MON$SQL_DIALECT, CASE
 * MON$SHUTDOWN_MODE WHEN 0 THEN 'ONLINE' WHEN 1 THEN 'MULTI-USER SHUTDOWN' WHEN
 * 2 THEN 'SINGLE-USER SHUTDOWN' WHEN 3 THEN 'FULL SHUTDOWN' END AS
 * MON$SHUTDOWN_MODE, MON$SHUTDOWN_MODE, MON$SWEEP_INTERVAL, MON$READ_ONLY,
 * MON$FORCED_WRITES, MON$RESERVE_SPACE, MON$CREATION_DATE, MON$PAGES, CASE
 * MON$BACKUP_STATE WHEN 0 THEN 'NORMAL' WHEN 1 THEN 'STALLED' WHEN 2 THEN
 * 'MERGE' END AS MON$BACKUP_STATE, MON$STAT_ID from MON$DATABASE
 */
